package com.mayikt.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Name ChannelUtils
 * @Author 枫火
 * @Date 2021/5/21 11:45
 * @Description
 **/
@Component
public class ChannelUtils {
    @Value("${mayikt.login.token.channel}")
    private String[] loginTokenChannel;

    public Boolean existChannel(String channel) {
        for (int i = 0; i < loginTokenChannel.length; i++) {
            if (channel.toLowerCase().equals(loginTokenChannel[i])) {
                return true;
            }
        }
        return false;
    }
}
